package org.yoki.edu.bg.radius.filter.app.receiver.packet;

import lombok.Data;

import java.net.DatagramPacket;

/**
 * @author Sky$
 * @Description: TODO
 * @date 2018/1/19$ 13:55$
 */
@Data
public class RadiusPacket {

    private boolean isAcct;

    private boolean isResponse;

    private DatagramPacket packet;

    public RadiusPacket(DatagramPacket packet) {
        this(null, null, packet);
    }

    public RadiusPacket(Boolean isAcct, Boolean isResponse, DatagramPacket packet) {
        if (null == isAcct) {
            this.isAcct = false;
        }
        if (null == isResponse) {
            this.isResponse = false;
        }
        if (null == packet) {
            throw new NullPointerException();
        }
        this.packet = packet;
    }

}
